// 错误页面
const NotFind = () => import(/* webpackChunkName:"layout" */ 'src/views/error/404.vue')
// 公共页面
const Login = () => import(/* webpackChunkName:"layout" */ 'src/views/login/index.vue')
const Layout = () => import(/* webpackChunkName:"layout" */ 'src/views/layout/index.vue')
const Dashboard = () => import(/* webpackChunkName:"layout" */ 'src/views/dashboard/index.vue')
const Profile = () => import(/* webpackChunkName:"layout" */ 'src/views/profile/index.vue')

const routes = [
  {
    path: '/',
    name: 'index',
    component: Layout,
    redirect: '/dashboard',
    meta: { title: '主页' },
    children: [
      { path: '/dashboard', name: 'dashboard', component: Dashboard, meta: { title: '控制台' } },
      { path: '/404', name: '404', component: NotFind, meta: { title: 'NotFind' } },
      { path: '/system/accountProfile', component: Profile, meta: { title: '个人信息' } }
    ]
  },
  { path: '/login', name: 'login', component: Login, meta: { title: '登录' } }
]

export default routes
